import request from '@/utils/request'

export default {
    getHistory(current, limit) {
        return request({
            url: `/post/history/${current}/${limit}`,
            method: 'get'
        })
    },
    // 3.获得待处理的申请列表
    getExamine(current, limit) {
        return request({
            url: `/post/examine/${current}/${limit}`,
            method: 'get'
        })
    },
    // 4.获得自己已经处理完成的申请列表
    getApprove(current, limit) {
        return request({
            url: `/post/approve/${current}/${limit}`,
            method: 'get'
        })
    },
    add(invitation) {
        return request({
            url: `/post`,
            method: 'post',
            data: invitation
        })
    },
    // 6.通过申请
    pass(id) {
        return request({
            url: `/post/pass/${id}`,
            method: 'post'
        })
    },
    // 7.拒绝申请
    deny(id) {
        return request({
            url: `/post/deny/${id}`,
            method: 'post'
        })
    },
    // 7.拒绝申请
    prime(id) {
        return request({
            url: `/post/prime/${id}`,
            method: 'post'
        })
    },
    show(current, limit) {
        return request({
            url: `/post/${current}/${limit}`,
            method: 'get'
        })
    },

    getDetail(id) {
        return request({
            url: `/post/${id}`,
            method: 'get'
        })
    },

    delete(ids) {
        return request({
            url: `/post`,
            method: 'delete',
            data: ids
        })
    }
}